]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageList: Use Clutter cursors
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 5 Nov 2025 11:40:18 +0000 (12:40 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Mon, 19 Jan 2026 09:33:30 +0000 (09:33 +0000)
Set the hand cursor on URLs through ClutterActor API, instead of
globally.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3952>

js/ui/messageList.js

index 509d2e84fee37c67080360acd860ae0e46e09ef9..d9b30cf485cd8412c369409ce0d680a72156b628 100644 (file)
@@ -5,7 +5,6 @@ import Gio from 'gi://Gio';
 import GLib from 'gi://GLib';
 import GObject from 'gi://GObject';
 import Graphene from 'gi://Graphene';
-import Meta from 'gi://Meta';
 import Pango from 'gi://Pango';
 import Shell from 'gi://Shell';
 import St from 'gi://St';
@@ -88,10 +87,10 @@ class URLHighlighter extends St.Label {
 
         const urlId = this._findUrlAtPos(...event.get_coords());
         if (urlId !== -1 && !this._cursorChanged) {
-            global.display.set_cursor(Meta.Cursor.POINTER);
+            this.set_cursor_type(Clutter.CursorType.POINTER);
             this._cursorChanged = true;
         } else if (urlId === -1) {
-            global.display.set_cursor(Meta.Cursor.DEFAULT);
+            this.set_cursor_type(Clutter.CursorType.DEFAULT);
             this._cursorChanged = false;
         }
         return Clutter.EVENT_PROPAGATE;
@@ -103,7 +102,7 @@ class URLHighlighter extends St.Label {
 
         if (this._cursorChanged) {
             this._cursorChanged = false;
-            global.display.set_cursor(Meta.Cursor.DEFAULT);
+            this.set_cursor_type(Clutter.CursorType.DEFAULT);
         }
         return super.vfunc_leave_event(event);
     }